package com.ufgov.agcfs.baseData.entity;

import java.io.Serializable;

import com.ufgov.agcfs.report.entity.RptTypeNode;

public class AccNode implements Serializable {
	private static final long serialVersionUID = 807714332969702595L;
	
	
	private String id;	
	private String parent;	
	private String text;
	private String nd;
	public String getNd() {
		return nd;
	}

	public void setNd(String nd) {
		this.nd = nd;
	}

	private String accBookTypeCode;
	private String accBookTypeName;
	
	public AccNode(){
	}
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getParent() {
		return parent;
	}
	public void setParent(String parent) {
		this.parent = parent;
	}
	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
	public String getAccBookTypeCode() {
		return accBookTypeCode;
	}
	public void setAccBookTypeCode(String accBookTypeCode) {
		this.accBookTypeCode = accBookTypeCode;
	}
	public String getAccBookTypeName() {
		return accBookTypeName;
	}
	public void setAccBookTypeName(String accBookTypeName) {
		this.accBookTypeName = accBookTypeName;
	}
	
	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		AccNode castOther = (AccNode)other;
		return 
			this.id.equals(castOther.id);
	}

	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.id.hashCode();
		return hash;
	}
	
	public static AccNode createNode(String id,String parent,String text,String accBookTypeCode,
									String accBookTypeName){		
			AccNode node = new AccNode();
			node.setId(id);
			node.setText(text);
			node.setParent(parent);
			node.setAccBookTypeCode(accBookTypeCode);
			node.setAccBookTypeName(accBookTypeName);
			return node;
			}

}
